﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using NurseStation;
using NurseStation.DataModels;
using SqlSugar;
using Prism.Mvvm;

namespace NurseStation.DataModels
{
    [SugarTable("DICT_COL")]
    public class ColShow : BindableBase
    {
        [SugarColumn(IsPrimaryKey = true)]
         
        public long Id { get; set; }

        [SugarColumn(IsIgnore = true, IsNullable = true)]
        /// <summary>
        /// 字符串格式的ID
        /// </summary>
        public string SID { get; set; }
        /// <summary>
        /// 显示文本
        /// </summary>
        public string Header { get; set; }

        /// <summary>
        /// 字段名，用于从实体中取值
        /// </summary>
        public string FieldName { get; set; }
        /// <summary>
        /// 是否显示 是，否
        /// </summary>
        public string IfShow { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }


        /// <summary>
        /// 是否显示
        /// </summary>
        private Visibility _IsShow;


        [SugarColumn(IsIgnore = true)]
        public Visibility IsShow
        {
            get => _IsShow;
            set
            {
                _IsShow = value;
                RaisePropertyChanged(nameof(IsShow));
            }
        }
    }
}
